<div style="width: 700px; margin-left: auto; margin-right: auto; text-align: center; border: solid 1px #dddddd; background: #eeeeee; padding: 10px">
  <form action="/media/search" method="get">
    <label for="query" style="font-weight: bold;">Search:</label>
    <%= text_field_tag 'query', params[:query], :size => '80' %>
    <%= submit_tag 'Search' %>
  </form>
</div>
<% unless @medias.nil? %>
<% unless params[:query].nil? and params[:tag].nil? %>
<%= render :partial => 'list', :locals => { :params => params, :category => @category, :medias => @medias } %>
<% end %>
<div style="text-align: center;">
<%= link_to('&laquo; Previous', :page => @pages.current.previous.number, :params => @query) if @pages.current.previous %>
<%= pagination_links(@pages, :params => @query) %>
<%= link_to('Next &raquo;', :page => @pages.current.next.number, :params => @query) if @pages.current.next %>
</div>
<% end %>
